import pymongo
import datetime

client = pymongo.MongoClient('localhost', 27017)
db = client.mydb

message = db.message
# 查询数据
date = datetime.datetime.strptime('2018-09-02T11:30:40+08:00','%Y-%m-%dT%H:%M:%S+08:00')
print(date)
# print(type(datetime.datetime.now()))
# article = {
# 	'id' : 1,
# 	'date':datetime.datetime.now()
# }
# message.insert(article)